#ifndef CSINGLEAPPLICATION_H
#define CSINGLEAPPLICATION_H

#include <QCoreApplication>
#include <QSharedMemory>

class CSingleApplication : public QCoreApplication
{
    Q_OBJECT
public:
    explicit CSingleApplication(int argc, char *agrv[], const QString &key = "CSingleApplication");
    ~CSingleApplication();

    bool isRunning() { return m_running; }

signals:

public slots:

private:
    QSharedMemory   m_sharedMemory;
    bool            m_running;          // Has existed a instance is running
};

#endif // CSINGLEAPPLICATION_H
